;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2017 Andy Wingo <wingo@igalia.com>
;;;
;;; This file is NOT part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (staging linux-nonfree)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages tls)
  #:use-module (guix build-system trivial)
  #:use-module (guix build-system linux-module)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public (rtl8812au-module kernel)
  (let ((commit "9f09c7627bda0ab5a577c1ad0337666ca2951132")
        (revision "1"))
    (package
      (name "rtl8812au-module")
      (version (git-version "4.3.14" revision commit))
      (source (origin
                (method git-fetch)
                (uri
                 (git-reference
                  (url "https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git")
                  (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "16wvgq6pq24i5skn87kan9xfyyhg6w62c3wp54dz0v0si4c8k0gw"))))
      (build-system linux-module-build-system)
      (arguments
       `(#:tests? #f
         #:linux ,kernel))
      (home-page "wtf")
      (synopsis "wut")
      (description "wut")
      (license license:gpl2))))

(define-public (tuxedo-keyboard-module kernel)
  (package
    (name "tuxedo-keyboard-module")
    (version "2.0.2")
    (source (origin
              (method git-fetch)
              (uri
               (git-reference
                (url "https://github.com/tuxedocomputers/tuxedo-keyboard.git")
                (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1qgjbqs9b2agm4aabidhxplwi7x1km554k3wr68fb5n8y0bb7rbm"))))
    (build-system linux-module-build-system)
    (arguments
     `(#:tests? #f
       #:linux ,kernel))
    (home-page "https://github.com/tuxedocomputers/tuxedo-keyboard")
    (synopsis "Tuxedo computers kernel module for keyboard
backlighting")
    (description "Tuxedo computer kernel module for keyboard
backlighting.")
    (license license:gpl2)))
